var myArray = [];
var count = 1;
var key, value;

for(var i=0; i<10; i++){
	key = "data" + count;
	value = "message" + count;
	count++;
	
	myArray[key] = value;
}

console.log(myArray);

for(var item in myArray){
	console.log("item= " + item);
	console.log(myArray[item]);
}